package com.lb.activity.service.impl;

import com.lb.activity.mapper.UserRoleMapper;
import com.lb.activity.service.UserRoleService;
import com.lb.activity.vo.UserRole;
import com.lb.activity.vo.UserRoleExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 001030
 */
@Service
public class UserRoleServiceImpl implements UserRoleService {

    @Resource
    private UserRoleMapper userRoleMapper;

    @Override
    public List<UserRole> getUserRoles(Long id) {
        UserRoleExample example = new UserRoleExample();
        UserRoleExample.Criteria criteria = example.createCriteria();
        criteria.andUseridEqualTo(id);
        List<UserRole> storeUserRoles = userRoleMapper.selectByExample(example);
        return storeUserRoles;
    }
}
